package day8;

import java.util.Scanner;

public class car {
    String band;
    double price;
    String colour;

    public car() {
    }

    public car(String band, double price, String colour) {
        this.band = band;
        this.price = price;
        this.colour = colour;
    }

    /**
     * 获取
     *
     * @return band
     */
    public String getBand() {
        return band;
    }

    /**
     * 设置
     *
     * @param band
     */
    public void setBand() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入车辆品牌：");
        String band = sc.next();
        this.band = band;
    }

    /**
     * 获取
     *
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     *
     * @param price
     */
    public void setPrice() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入车辆价格：");
        double price = sc.nextDouble();
        this.price = price;
    }

    /**
     * 获取
     *
     * @return colour
     */
    public String getColour() {
        return colour;
    }

    /**
     * 设置
     *
     * @param colour
     */
    public void setColour() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入车辆颜色：");
        String colour = sc.next();
        this.colour = colour;
    }

}
